{%- extends "apostrophe-modal:base.html" -%}
{%- import "apostrophe-modal:macros.html" as modals -%}
{%- import "piecesMacros.html" as pieces with context -%}
{%- import 'apostrophe-ui:components/buttons.html' as buttons -%}
{%- import 'apostrophe-schemas:macros.html' as schemas -%}
{%- import 'apostrophe-modal:batch.html' as batch -%}

{%- block modalClass -%}
  {{ (data.options.name + '-manager') | css }} apos-ui-modal-no-sidebar apos-manager
{%- endblock -%}

{%- block controls -%}
  {{ module.managerControls() }}
{%- endblock -%}

{%- block instructions -%}
  {{ __ns('apostrophe', 'Here you can add new %s or click on existing ones to edit them.', __ns('apostrophe', data.options.pluralLabel |  d(''))) }}
{%- endblock -%}

{%- block filters -%}
  {# ajax populates me #}
  <div class="apos-clearfix apos-modal-filters-inner" data-filters>
  </div>
{%- endblock -%}

{%- block label -%}
  {{ __ns('apostrophe', 'Manage %s', __ns('apostrophe', data.options.pluralLabel | d(''))) }}
{%- endblock -%}

{%- block body -%}
  <div class="apos-manage-view" data-apos-manage-view>
    {# ajax populates me with either the grid view or the table view #}
  </div>
{%- endblock -%}

{%- block footer -%}
  <div class="apos-modal-footer-inner">
    {%- block batch -%}
      {{ batch.operations(data.options.batchOperations) }}
    {%- endblock -%}
    <div class="apos-manage-pager" data-pager></div>
  </div>
{%- endblock -%}
